package practice.birth;

import java.util.Scanner;

/**
 * Wrong algorithm here!!!
 * @author ekulcyk
 *
 */
public class Main {

	public Main() {
		Scanner s = new Scanner(System.in);
		double three = 1/Math.pow(365, 3);
		double[][]answer = new double[1001][1001];
		for (int i =0; i < 1001; i++)
			answer[i][0]=three;
		for (int i = 0; i < 1001; i++)
			for (int j =1; j < 1001; j++){
					answer[i][j]=(double)answer[i][j-1]*(((double)(i+1))/((double)j)-1);
					
					if (i==23)
						System.out.println("j: "+j+" "+answer[i][j]);
			}
		
		int casenum=0;
		
		while(true){
			int n = s.nextInt();
			if (casenum!=0)
				System.out.println("");
			if (n==-1)
				break;
			casenum++;
			double sum=0;
			for (int i =3; i < 1001;i++){
				sum+=answer[n][i]/Math.pow(365, i);
					System.out.println("n: "+n+" i: "+i+" sum: "+answer[n][i]/Math.pow(365, i));
			}
			double num = sum*100;
			System.out.printf("%f",num);
			
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new Main();
	}

}